#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QLabel>
#include <QProgressBar>
#include <QSpinBox>
#include <QFontComboBox>
#include <QActionGroup>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    virtual ~MainWindow();

private:
    QLabel *labFile;
    QLabel *labInfo;
    QProgressBar *progressBar;

    QSpinBox *spinFontSize;
    QFontComboBox *fontComboBox;

    QActionGroup *actionGroup;

    void buildUi();
    void buildSignalSlots();

private slots:
    void do_fontSize_changed(int fontSize);
    void do_fontSelected(const QFont &font);
    void on_textEdit_copyAvailable(bool b);
    void on_textEdit_selectionChanged();
    void on_actFont_Bold_triggered(bool checked);
    void on_actFont_Italic_triggered(bool checked);
    void on_actFont_UnderLine_triggered(bool checked);
    void on_actSys_ToggleText_triggered(bool checked);
    void on_actFile_New_triggered();
    void on_actFile_Open_triggered();
    void on_actFile_Save_triggered();

private:
    Q_DISABLE_COPY(MainWindow)

    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H
